<!DOCTYPE html>
<html>

<head>
    <title>Vue源码剖析</title>
    <script src="../../dist/vue.js"></script>
</head>

<body>
    <div id="demo">
        <h1>Vue<span>模板编译</span></h1>
        <!-- 观察v-if、v-for的解析 -->
        <!-- <p v-if="foo">{{foo}}</p> -->
        <b v-for="s in arr" :key="s" v-if="s">{{s}}</b>
        <comp></comp>
    </div>
    <script>
        Vue.component('comp', {
            template: '<div>I am comp</div>'
        })
        // 创建实例
        const app = new Vue({
            el: '#demo',
            data: { foo: 'foo', arr: [1, 2] },
        });
        // 输出render函数
        console.log(app.$options.render);
        console.log(app);
        
    </script>
</body>

</html>